package com.tdkj.model.decorate;

import java.math.BigDecimal;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.tdkj.model.base.BaseEntity;

/**
 * 
 */
@Entity
@Table(name = "decorate_decorate")
public class BeanDecorate extends BaseEntity {

	private String name;
	
	private BeanDecorateType type;
	
	private BigDecimal price;
	
	private String unit;
	
	private BigDecimal timeLimitAmount;
	
	private String timeLimitUnit;
	
	private Integer coordinateX;
	
	private Integer coordinateY;
	
	//0,1,2 店铺和空间，店铺，空间
	private Integer useType;
	
	private String imgurl;

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@ManyToOne(fetch=FetchType.LAZY, cascade={CascadeType.REFRESH})
	@JoinColumn(name="type_id")
	public BeanDecorateType getType() {
		return type;
	}

	public void setType(BeanDecorateType type) {
		this.type = type;
	}

	/**
	 * @return the price
	 */
	public BigDecimal getPrice() {
		return price;
	}

	/**
	 * @param price the price to set
	 */
	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	/**
	 * @return the unit
	 */
	public String getUnit() {
		return unit;
	}

	/**
	 * @param unit the unit to set
	 */
	public void setUnit(String unit) {
		this.unit = unit;
	}

	/**
	 * @return the timeLimitAmount
	 */
	public BigDecimal getTimeLimitAmount() {
		return timeLimitAmount;
	}

	/**
	 * @param timeLimitAmount the timeLimitAmount to set
	 */
	public void setTimeLimitAmount(BigDecimal timeLimitAmount) {
		this.timeLimitAmount = timeLimitAmount;
	}

	/**
	 * @return the timeLimitUnit
	 */
	public String getTimeLimitUnit() {
		return timeLimitUnit;
	}

	/**
	 * @param timeLimitUnit the timeLimitUnit to set
	 */
	public void setTimeLimitUnit(String timeLimitUnit) {
		this.timeLimitUnit = timeLimitUnit;
	}

	/**
	 * @return the coordinateX
	 */
	public Integer getCoordinateX() {
		return coordinateX;
	}

	/**
	 * @param coordinateX the coordinateX to set
	 */
	public void setCoordinateX(Integer coordinateX) {
		this.coordinateX = coordinateX;
	}

	/**
	 * @return the coordinateY
	 */
	public Integer getCoordinateY() {
		return coordinateY;
	}

	/**
	 * @param coordinateY the coordinateY to set
	 */
	public void setCoordinateY(Integer coordinateY) {
		this.coordinateY = coordinateY;
	}

	/**
	 * @return the useType
	 */
	public Integer getUseType() {
		return useType;
	}

	/**
	 * @param useType the useType to set
	 */
	public void setUseType(Integer useType) {
		this.useType = useType;
	}

	/**
	 * @return the imgurl
	 */
	public String getImgurl() {
		return imgurl;
	}

	/**
	 * @param imgurl the imgurl to set
	 */
	public void setImgurl(String imgurl) {
		this.imgurl = imgurl;
	}
	
}